Automatic Checking of the Usage of the C++11 Move Semantics
نویسندگان
چکیده
The C++ programming language is a favorable choice when implementing high performance applications, like real-time and embedded programming, large telecommunication systems, financial simulations, as well as a wide range of other speed sensitive programs. While C++ has all the facilities to handle the computer hardware without compromises, the copy based value semantics of assignment is a common source of performance degradation. New language features, like the move semantics were introduced recently to serve an instrument to avoid unnecessary copies. Unfortunately, correct usage of move semantics is not trivial, and unintentional expensive copies of C++ objects – like copying containers instead of using move semantics – may determine the main (worst-case) time characteristics of the programs. In this paper we introduce a new approach of investigating performance bottlenecks for C++ programs, which operates at language source level and targets the move semantics of the C++ programming language. We detect copies occurring in operations marked as move operations, i.e. intended not containing expensive copy actions. Move operations are marked with generalized attributes – a new language feature introduced to C++11 standard. We implemented a tool prototype to detect such copy/move semantic errors in C++ programs. Our prototype is using the open source LLVM/Clang parser infrastructure, therefore highly portable.
منابع مشابه
A short introduction to two approaches in formal verification of security protocols: model checking and theorem proving
In this paper, we shortly review two formal approaches in verification of security protocols; model checking and theorem proving. Model checking is based on studying the behavior of protocols via generating all different behaviors of a protocol and checking whether the desired goals are satisfied in all instances or not. We investigate Scyther operational semantics as n example of this...
متن کاملPrivacy Enforcement and Accountability with Semantics ( PEAS 2007 ) Workshop 11
We show that the semantic formal model for Open Digital Right Language (ODRL)-based rights delegation policies can be enforced and expressed as a combination of ontologies and rules, e.g., Semantic Web Rule Language (SWRL). Based on ODRL’s expressions and data dictionary, a rights delegation ontology is proposed in this study. Furthermore, we express the rights delegation policy as a set of ont...
متن کاملAutomatic Verification by Abstract Interpretation
We discuss the use of abstract interpretation in the context of automatic program veri cation requiring precise abstractions. We compare entirely manual versus user-guided abstractions ranging from program-speci c abstractions including predicate abstraction to the systematic design of abstract domains and iteration strategies. 1 Abstract Interpretation Theory Abstract interpretation theory [1,...
متن کاملAn Advanced Hybrid Honeypot for Providing Effective Resistance in Automatic Network Generation
Increasing usage of Internet and computer networks by individuals and organizations and also attackers’ usage of new methods and tools in an attempt to endanger network security, have led to the emergence of a wide range of threats to networks. A honeypot is one of the basic techniques employed for network security improvement. It is basically designed to be attacked so as to get the attackers’...
متن کاملA Hybrid Meta-heuristic Approach to Cope with State Space Explosion in Model Checking Technique for Deadlock Freeness
Model checking is an automatic technique for software verification through which all reachable states are generated from an initial state to finding errors and desirable patterns. In the model checking approach, the behavior and structure of system should be modeled. Graph transformation system is a graphical formal modeling language to specify and model the system. However, modeling of large s...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Acta Cybern.
دوره 22 شماره
صفحات -
تاریخ انتشار 2015